require 'code39'

module PrintHelper
  
  def generate_barcode (object, attribute, value)
     loc = "./images/" + object.class.name.downcase + "/" + object.id.to_s + "_" + attribute + ".gif"

     # add rescue logic
     #code = Code39.new(value.to_s)
     #code.to_img(loc, 200, 50)
     loc
   end
end
